<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1、await关键字只能在async函数使用，不能在普通函数中使用
        // 2、await 相当于 then 获取promise--resolve的结果
        async function show(){
            console.log("start");
            var p = await go()  
            console.log(p);    //mid
            console.log("end");
        }
        async function go(){
            return "mid"
        }
        show()
    </script>
</body>
</html>